<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"  %>
<html><head>
<!--
Zeke Elder - zbe@andrew.cmu.edu
Amal Chemmany - achemman@andrew.cmu.edu
Nishant Kumar - nkumar1@andrew.cmu.edu
15-637
4/2/2012
--><title>Welcome to FitHub!</title>
<c:if test="${user == null}">
<c:redirect url="welcome.jsp"/>
</c:if>
<link href="css/friends.css" type="text/css" rel="stylesheet">
</head>

<body>
<!-- include header.jsp --> <jsp:include page="./header.jsp" flush="false" />
<div id="maindiv" class="body_container">
<div id="people_bar">
<h1> Notifications</h1>

<div class="centered_div"> 
<!--
<h2> Recent Workouts</h2>
<form name="pendingWorkoutForm" method="post" action="completeWorkout.do">
<c:if test="${pendingWorkouts != null}">
<table>
	<c:forEach var="entry" items="${pendingWorkouts}">
		<tr>
			<td>Workout Index<input type="hidden" value="${entry.workoutId}" name="workoutId" /></td>
			<td>
				<input type="submit" value="Accept Invite" name="action"/>
			</td>
			<td>
				<input type="submit" value="Decline Invite" name="action"/>
			</td>
		</tr>
	</c:forEach>
</table>
</c:if>
</form>
-->
<h2> Group Invites Pending</h2>
<c:if test="${invites != null}">
<table>
	<c:forEach var="entry" items="${invites}">
		<tr>
			<td>${entry.group.groupName}</td>
			<td>
				<input type="button" value="Accept Invite" onclick="window.location='acceptInvites.do?groupId=${entry.group.groupId}&action=Accept';"/>
			</td>
			<td>
				<input type="button" value="Decline Invite" onclick="window.location='acceptInvites.do?groupId=${entry.group.groupId}&action=Decline';"/>
			</td>
		</tr>
	</c:forEach>
</table>
</c:if>
</body></html>